/*!
 *  Copyright (c) 2015 by Joshua Zhang
 * \file detector.hpp
 * \brief ssd detection module header
 */
#include "c_predict_api.h"
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
#include "basedetector.h"

class SSDDetector:public PersonDetector {
 public:
	 SSDDetector(std::string model_prefix, int epoch, int width, int height,
           float mean_r, float mean_g, float mean_b,
           int device_type=1, int device_id=0);


  std::vector<float> detect(std::string in_img);
  std::vector<float> detect(const char *in_img) {
    return detect(std::string(in_img));
  }
  std::vector<float> detect(const cv::Mat& img);

  virtual void detect(const cv::Mat& img, std::vector<cv::Point2f>& centers, std::vector<cv::Rect>& rects) override;

 private:
  PredictorHandle predictor_;
  std::vector<char> buffer_;
  unsigned int width_;
  unsigned int height_;
  float mean_r_;
  float mean_g_;
  float mean_b_;
};  // class Detector

